<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>待核查的文章列表</title>
    <link rel="stylesheet" th:href="@{/css/bootstrap.css}"></link>
</head>
<body class="container" style="width: 70%;">

<div th:replace="layout/header :: header"></div>

<content>
    <div>
        <br/>
        <h1>待核查的文章</h1>
        <div class="with:80%">
            <table class="table table-hover">
                <thead>
                <tr>
                    <!--<th>#</th>-->
                    <th>发布者</th>
                    <th>标题</th>
                    <th>发布时间</th>
                    <!--<th>浏览次数</th>-->
                    <th>详情</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr  th:each="article : ${pageBean.data}">
                    <!--<th scope="row" th:text="${user.id}">1</th>-->
                    <td th:text="${article.user.username}">neo</td>
                    <td th:text="${article.title}">neo@126.com</td>
                    <td th:text="${#dates.format(article.createTime, 'yyyy-MM-dd HH:mm:ss')}">6</td>
                    <!--<td th:text="${article.viewCount}">6</td>-->
                    <td><a th:href="@{/article_detail(id=${article.id})}">详情</a></td>
                    <td><a th:href="@{/checkArticle(id=${article.id})}">审查</a></td>
                </tr>
                </tbody>
            </table>
            <!-- <div th:include="page :: pager" th:remove="tag"></div>-->
        </div>

        <br />

        <div class="row">
            <ul class="pagination" style="float: right;">

                <div th:if="${pageBean.pagebar!=null}">

                    <li th:if="${pageBean.currentpage != pageBean.previouspage}"><a th:href="@{/checkArticleList/(currentPage=${pageBean.previouspage})}">上一页</a></li>
                    <!-- <a th:href="@{https://www.localhost:8080/{type}/aa(type=${type}, id=${id})}">type&id</a>-->
                    <div th:each="num : ${pageBean.pagebar}" th:remove="tag">
                        <li th:if="${pageBean.currentpage == num}" class="disabled"><a th:text="${num}" href="#"></a></li>
                        <li th:if="${pageBean.currentpage != num}"><a th:text="${num}" th:href="@{/checkArticleList/(currentPage=${num})}"></a></li>
                    </div>

                    <li th:if="${pageBean.currentpage != pageBean.nextpage}"><a th:href="@{/checkArticleList/(currentPage=${pageBean.nextpage})}">下一页</a></li>
                </div>
            </ul>
        </div>

    </div>
</content>

</body>
</html>